package com.kongzue.baseokhttpv3.slice;

import java.util.List;

/**
 * DataBean
 *
 * @author: Kongzue
 * @github: https://github.com/kongzue/
 * @homepage: http://kongzue.com/
 * @mail: myzcxhh@live.cn
 * @createTime: 2020/7/31 18:38
 */
public class DataBean {

    private int code;
    private String message;
    private List<Result> result;

    /**
     * DataBean
     */
    public DataBean() {
    }

    /**
     * DataBean
     *
     * @param code    code
     * @param message message
     * @param result  result
     */
    public DataBean(int code, String message, List<Result> result) {
        this.code = code;
        this.message = message;
        this.result = result;
    }

    /**
     * getCode
     *
     * @return int
     */
    public int getCode() {
        return code;
    }

    /**
     * setCode
     *
     * @param code code
     * @return DataBean
     */
    public DataBean setCode(int code) {
        this.code = code;
        return this;
    }

    /**
     * getMessage
     *
     * @return String
     */
    public String getMessage() {
        return message;
    }

    public DataBean setMessage(String message) {
        this.message = message;
        return this;
    }

    public List<Result> getResult() {
        return result;
    }

    public DataBean setResult(List<Result> result) {
        this.result = result;
        return this;
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("DataBean{code=");
        sb.append(code);
        sb.append(", message='");
        sb.append(message);
        sb.append('\'');
        sb.append(", result=");
        sb.append("[");
        if (result != null) {
            for (Result r : result) {
                sb.append(r);
                sb.append(",\n");
            }
        }
        sb.append("]");
        sb.append('}');
        return sb.toString();
    }


    public static class Result {

        /**
         * Result
         *
         * @param path  path
         * @param image image
         * @param title title
         * @param time  time
         */
        public Result(String path, String image, String title, String time) {
            this.path = path;
            this.image = image;
            this.title = title;
            this.time = time;
        }

        /**
         * Result
         */
        public Result() {
        }

        private String path;
        private String image;
        private String title;
        private String time;
        private boolean visible;

        /**
         * getPath
         *
         * @return String
         */
        public String getPath() {
            return path;
        }

        /**
         * setPath
         *
         * @param path path
         * @return Result
         */
        public Result setPath(String path) {
            this.path = path;
            return this;
        }

        /**
         * getImage
         *
         * @return String
         */
        public String getImage() {
            return image;
        }

        /**
         * setImage
         *
         * @param image image
         * @return Result
         */
        public Result setImage(String image) {
            this.image = image;
            return this;
        }

        /**
         * getTitle
         *
         * @return String
         */
        public String getTitle() {
            return title;
        }

        /**
         * setTitle
         *
         * @param title title
         * @return Result
         */
        public Result setTitle(String title) {
            this.title = title;
            return this;
        }

        /**
         * getTime
         *
         * @return String
         */
        public String getTime() {
            return time;
        }

        /**
         * setTime
         *
         * @param time time
         * @return Result
         */
        public Result setTime(String time) {
            this.time = time;
            return this;
        }

        /**
         * isVisible
         *
         * @return boolean
         */
        public boolean isVisible() {
            return visible;
        }

        /**
         * |
         * setVisible
         *
         * @param visible visible
         * @return Result
         */
        public Result setVisible(boolean visible) {
            this.visible = visible;
            return this;
        }

        @Override
        public String toString() {
            return "Result{"
                    + "path='" + path + '\''
                    + ", image='" + image + '\''
                    + ", title='" + title + '\''
                    + ", time='" + time + '\''
                    + '}';
        }
    }
}
